package com.rocpenghua.design.mediator;

/**
 * @author pengp
 * @date 2023年02月24日 15:16
 */
public class MainTest {
    public static void main(String[] args) {
        Buyer b = new Buyer("张三");
        Buyer c = new Buyer("李四");
        ConcreteMediator concreteMediator = new ConcreteMediator();
        concreteMediator.register(b);
        concreteMediator.register(c);
        c.Send("张三","你好张三");
        b.Send("李四","你好李四");
    }
}
/**
 * 张三接收到来自李四的消息:你好张三
 * 李四接收到来自张三的消息:你好李四
 */
